package me.ywd.comparison.web;

import me.ywd.comparison.component.TrackGenerator;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Date;

/**
 * @Author Ye_Wenda
 * @Date 7/25/2017
 */

@Controller
@RequestMapping("/mock")
public class MockController {

    @Autowired
    private TrackGenerator trackGenerator;

    @GetMapping("/track")
    @ResponseBody
    public String mockTrack() {
        return trackGenerator.mockTrack(1, new Date()).toString();
    }
}
